﻿#include "CmdLineChartSidebarVariableAxisChanged.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdLineChartSidebarVariableAxisChanged::CmdLineChartSidebarVariableAxisChanged()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdLineChartSidebarVariableAxisChanged::~CmdLineChartSidebarVariableAxisChanged()
    {
    }

    bool CmdLineChartSidebarVariableAxisChanged::execute()
    {
        // bool _success = false;
        emit IBaseSignalInstance->signal_lineChartSidebarVariableAxisChanged(m_mainWindowId, m_allSelectedItem, m_reuslt, m_sVariableAxistCurrentText);
        return true;
    }

    void CmdLineChartSidebarVariableAxisChanged::undo()
    {
    }

    void CmdLineChartSidebarVariableAxisChanged::redo()
    {
        // execute();
    }

    void CmdLineChartSidebarVariableAxisChanged::setLineChartSidebarVariableAxisChanged(int mainWindowId, QList<int> allSelectedItem, int reuslt, QString sVariableAxistCurrentText)
    {
        m_mainWindowId = mainWindowId;
        m_allSelectedItem = allSelectedItem;
        m_reuslt = reuslt;
        m_sVariableAxistCurrentText = sVariableAxistCurrentText;
    }

} // namespace PostCommand
